<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>filter by 使用</title>
  </head>
  <body>
    <div class="" id="app">
      <input v-model="name" type="text" name="name" value="">
      <ul>
        <li v-for="user in users | orderBy 'id' 1 | filterBy name in 'name' 'id'">{{user.name}}</li>
      </ul>
    </div>
    <script src="js/jquery-1.8.3.min.js" charset="utf-8"></script>
    <script src="js/vue.js" charset="utf-8"></script>
    <script type="text/javascript">
      var vm;
      $(function(){
        vm = new Vue({
          el:'#app',
          data:{
            name:'',
            users:
              [
                {id:'002212',name:'金明江'},
                {id:'001111',name:'邓洪波'},
                {id:'003311',name:'陈永富'},
                {id:'004411',name:'胡显明'},
                {id:'005511',name:'王斌'},
                {id:'006611',name:'徐 建'}
              ]
          }
        })
      })
    </script>
  </body>
</html>
